package police;

/**
 * 驾驶员类
 */
public class Driver {
    /**
     * 姓名
     */
    private String name;
    /**
     * 驾照号
     */
    private String number;
    /**
     * 喝酒状态，0表示没有喝酒；1表示喝了酒
     */
    private int drinkStatus;

    public Driver() {
    }

    public Driver(String name, String number, int drinkStatus) {
        this.name = name;
        this.number = number;
        this.drinkStatus = drinkStatus;
    }

    /**
     * 驾驶方法
     */
    public void drive(Car car){
        for(int i = 0;i < 120;i++){
            car.addSpeed();
        }

    }

    /**
     * 喝酒方法
     */
    public void drink(){
        this.drinkStatus = 1;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public int getDrinkStatus() {
        return drinkStatus;
    }

    public void setDrinkStatus(int drinkStatus) {
        this.drinkStatus = drinkStatus;
    }
}
